package com.laowang.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCouponMapper;
import com.laowang.project.system.domain.MyCoupon;
import com.laowang.project.system.service.MyCouponService;

/**
 * 用户购买的优惠券Service业务层处理
 *
 * @author laowang
 * @date 2023-07-25
 */
@Service
public class MyCouponServiceImpl implements MyCouponService {
    @Autowired
    private MyCouponMapper myCouponMapper;

    /**
     * 查询用户购买的优惠券
     *
     * @param id 用户购买的优惠券ID
     * @return 用户购买的优惠券
     */
    @Override
    public MyCoupon selectMyCouponById(Integer id) {
        return myCouponMapper.selectMyCouponById(id);
    }

    /**
     * 查询用户购买的优惠券列表
     *
     * @param myCoupon 用户购买的优惠券
     * @return 用户购买的优惠券
     */
    @Override
    public List<MyCoupon> selectMyCouponList(MyCoupon myCoupon) {
        return myCouponMapper.selectMyCouponList(myCoupon);
    }

    /**
     * 新增用户购买的优惠券
     *
     * @param myCoupon 用户购买的优惠券
     * @return 结果
     */
    @Override
    public int insertMyCoupon(MyCoupon myCoupon) {
        return myCouponMapper.insertMyCoupon(myCoupon);
    }

    /**
     * 修改用户购买的优惠券
     *
     * @param myCoupon 用户购买的优惠券
     * @return 结果
     */
    @Override
    public int updateMyCoupon(MyCoupon myCoupon) {
        return myCouponMapper.updateMyCoupon(myCoupon);
    }

    /**
     * 批量删除用户购买的优惠券
     *
     * @param ids 需要删除的用户购买的优惠券ID
     * @return 结果
     */
    @Override
    public int deleteMyCouponByIds(Integer[] ids) {
        return myCouponMapper.deleteMyCouponByIds(ids);
    }

    /**
     * 删除用户购买的优惠券信息
     *
     * @param id 用户购买的优惠券ID
     * @return 结果
     */
    @Override
    public int deleteMyCouponById(Integer id) {
        return myCouponMapper.deleteMyCouponById(id);
    }

    @Override
    public List<MyCoupon> selectMyCouponListWeb(MyCoupon myCoupon) {
        return myCouponMapper.selectMyCouponListWeb(myCoupon);
    }

    @Override
    public List<MyCoupon> checkRecord(List<Integer> collect) {
        return myCouponMapper.checkRecord(collect);
    }

    @Override
    public MyCoupon selectMyCouponByOrderId(String orderId) {
        return myCouponMapper.selectMyCouponByOrderId(orderId);
    }

    @Override
    public List<MyCoupon> selectMyCouponWeb(Integer shopId, String date) {
        return myCouponMapper.selectMyCouponWeb(shopId,date);
    }

    @Override
    public Integer selectCount(Integer shopId, String date) {
        return myCouponMapper.selectCount(shopId,date);
    }
}
